/**
 * Created by Administrator on 2016/8/4.
 */
var ul=document.querySelector('#div1 #ul2');
ul.innerHTML=ul.innerHTML+ul.innerHTML;
var li =document.querySelectorAll('#ul2 li');

ul.style.width=li[1].offsetWidth*li.length+'px';
console.log(ul.innerHTML);
console.log(li.length);
setInterval(function(){
    if(ul.offsetLeft < -ul.offsetWidth/2){
        ul.style.left=0+'px';
    }
    ul.style.left=ul.offsetLeft-2+'px';
},30);
